package com.breaktian.service.impl;

import com.breaktian.dao.UserDao;
import com.breaktian.pojo.model.UserModel;
import com.breaktian.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 用户服务实现类
 *
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;

    public Integer createUser(UserModel userModel) {
        return userDao.insert(userModel);
    }

    public Integer updateUser(UserModel userModel) {
        return userDao.update(userModel);
    }

    public Integer deleteUser(Integer id) {
        return userDao.delete(id);
    }

    public UserModel getUserById(Integer id) {
        return userDao.selectById(id);
    }
}
